home *** CD-ROM | disk | FTP | other *** search
/ Aminet 22 / Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso / Aminet / dev / c / ged4indent.lha / ged4indent / ged4indent.readme < prev    next >
Text File  |  1997-09-25  |  4KB  |  132 lines

  1. Short:    indent C-source in GoldEd4
  2. Version:  1.2
  3. Uploader: Thomas Aglassinger <agi@giga.or.at>
  4. Author:   Thomas Aglassinger <agi@giga.or.at>
  5. Type:     dev/c
  6. Kurz:     C-Quellcode in GoldEd4 einruecken
  7. Requires: GoldEd 4.x, GNUindent
  8.  
  9. TITLE
  10.  
  11.   ged4indent
  12.  
  13. VERSION
  14.  
  15.   1.2
  16.  
  17. AUTHOR
  18.  
  19.   Thomas Aglassinger <agi@giga.or.at>
  20.  
  21. DESCRIPTION
  22.  
  23.   Ged4indent is an ARexx-script which indents a C-source currently
  24.   displayed by GoldEd using GNUindent.
  25.  
  26. FEATURES
  27.  
  28.   None; simply does it's job.
  29.  
  30. SPECIAL REQUIREMENTS
  31.  
  32.   o GoldEd, Version 4.x (aminet:text/edit/)
  33.   o GNUindent (aminet:dev/c/)
  34.  
  35. AVAILABILITY
  36.  
  37.   aminet:dev/c/ged4indent.lha
  38.  
  39. PRICE
  40.  
  41.   Freeware
  42.  
  43. DISTRIBUTABILITY
  44.  
  45.   This stuff is Public Domain.
  46.  
  47. DISCLAIMER
  48.  
  49.   No responsibilities are taken for trashed sources, damaged Amigas
  50.   or any other components or data involved while using ged4indent.
  51.  
  52. CREDITS
  53.  
  54.   This script is based on material written by Michael Bauer. His
  55.   scripts are available from `aminet:dev/c/GEDindent.lha', but
  56.   does no longer work with GoldEd, release 4.
  57.  
  58. INSTALLATION
  59.  
  60.   Copy the ARexx-script `ged4indent.ged' to `GoldEd:ARexx/', and
  61.   build up a new menu entry for it, for example:
  62.  
  63.   COMMAND: GoldEd:Arexx/ged4indent.ged
  64.   TYPE   : Arexx
  65.   OUTPUT : CON:0/2048/384/128/indent/AUTO/WAIT/CLOSE/SCREENGOLDED.1
  66.  
  67.   Error messages will then appear on the screen of GoldEd.
  68.  
  69. CONFIGURATION
  70.  
  71.   By default, `indent' will be invoked using options which will match
  72.   the style GoldEd supports in it's initial configuration. If you do
  73.   not like this style, you can set an environment variable named
  74.   `ged4indent.prefs' with your preferred style, for example:
  75.  
  76.     setenv ged4indent.prefs "-bl -bli0 -i4 -sob -sc -npsl -npcs -lp"
  77.  
  78.   You can add a line like the above to your s:user-startup.
  79.  
  80.   Refer to the manual of indent for the meaning of these options.
  81.  
  82. ERROR HANDLING
  83.  
  84.   In case of `indent' shows up any error messages, a window will open
  85.   and display these messages. The source code in the current editor
  86.   window remains untouched.
  87.  
  88.   But usually the message reported by `indent' are not of much use.
  89.   You better run a compiler on your faulty source code to find out
  90.   details.
  91.  
  92. INDENTING A SINGLE FUNCTIONS
  93.  
  94.   If you do not want to indent the whole file, but just the function
  95.   the cursor currently is in, there is a second script included called
  96.   `ged4findent.ged'.
  97.  
  98.   To find the beginning of the current function, it searches backwards
  99.   for a `{' at the first column of a line. If found, it searches for
  100.   the corresponding `}' and marks the text in between.
  101.  
  102.   This block is written to a temporary file, processed by `indent' and
  103.   reloaded again. Because of the block operations, there will be some
  104.   flickering on the screen.
  105.  
  106.   Installation and configuration work as described above, too.
  107.  
  108. PROBLEMS
  109.  
  110.   The version of `indent' included on the Geek Gadgets v1 always opens
  111.   an output window on the screen, even if `indent' does not show any
  112.   messages. I do not know why. Use the SAS-compiled port in
  113.   aminet:dev/c.
  114.  
  115.   For `ged4findent.ged' it is important that the first curly bracket
  116.   (`{') of the function is in the first column of a line.
  117.  
  118. HISTORY
  119.  
  120.   v1.2, 25-Sep-1997
  121.   - added `ged4findent.ged' which indents only current function
  122.   - temporary files are always removed, even in case of error
  123.   - cursor position is always restored, even in case of error
  124.  
  125.   v1.1, 11-Jun-1997
  126.   - added support for environment variable `ged4indent.prefs'
  127.   - indented version is first created in a temporary file, and only
  128.     read into editor again if no error occurred
  129.  
  130.   v1.0, 26-Jan-1997
  131.   - initial release
  132.